﻿namespace WMS6.Web.BillingServiceRef
{
    using System;
    using System.CodeDom.Compiler;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Runtime.CompilerServices;
    using System.Runtime.Serialization;

    [Serializable, DebuggerStepThrough, GeneratedCode("System.Runtime.Serialization", "3.0.0.0"), DataContract(Name="InvoiceInfo", Namespace="http://schemas.datacontract.org/2004/07/WMS6.DataEntity")]
    public class InvoiceInfo : IExtensibleDataObject, INotifyPropertyChanged
    {
        [OptionalField]
        private DateTime BillingDateField;
        [OptionalField]
        private string CreatedByField;
        [OptionalField]
        private DateTime CreatedDateField;
        [NonSerialized]
        private ExtensionDataObject extensionDataField;
        [OptionalField]
        private List<InvoiceDetailInfo> InvoiceDetailInfosField;
        [OptionalField]
        private string InvoiceIDField;
        [OptionalField]
        private string OwnerIDField;
        [OptionalField]
        private int RowIDField;
        [OptionalField]
        private string StatementIDField;
        [OptionalField]
        private string UpdatedByField;
        [OptionalField]
        private DateTime UpdatedDateField;
        [OptionalField]
        private string WhIDField;
        [OptionalField]
        private string WhNameField;

        public event PropertyChangedEventHandler PropertyChanged;

        protected void RaisePropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if (propertyChanged != null)
            {
                propertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        [DataMember]
        public DateTime BillingDate
        {
            get
            {
                return this.BillingDateField;
            }
            set
            {
                if (!this.BillingDateField.Equals(value))
                {
                    this.BillingDateField = value;
                    this.RaisePropertyChanged("BillingDate");
                }
            }
        }

        [DataMember]
        public string CreatedBy
        {
            get
            {
                return this.CreatedByField;
            }
            set
            {
                if (!object.ReferenceEquals(this.CreatedByField, value))
                {
                    this.CreatedByField = value;
                    this.RaisePropertyChanged("CreatedBy");
                }
            }
        }

        [DataMember]
        public DateTime CreatedDate
        {
            get
            {
                return this.CreatedDateField;
            }
            set
            {
                if (!this.CreatedDateField.Equals(value))
                {
                    this.CreatedDateField = value;
                    this.RaisePropertyChanged("CreatedDate");
                }
            }
        }

        [Browsable(false)]
        public ExtensionDataObject ExtensionData
        {
            get
            {
                return this.extensionDataField;
            }
            set
            {
                this.extensionDataField = value;
            }
        }

        [DataMember]
        public List<InvoiceDetailInfo> InvoiceDetailInfos
        {
            get
            {
                return this.InvoiceDetailInfosField;
            }
            set
            {
                if (!object.ReferenceEquals(this.InvoiceDetailInfosField, value))
                {
                    this.InvoiceDetailInfosField = value;
                    this.RaisePropertyChanged("InvoiceDetailInfos");
                }
            }
        }

        [DataMember]
        public string InvoiceID
        {
            get
            {
                return this.InvoiceIDField;
            }
            set
            {
                if (!object.ReferenceEquals(this.InvoiceIDField, value))
                {
                    this.InvoiceIDField = value;
                    this.RaisePropertyChanged("InvoiceID");
                }
            }
        }

        [DataMember]
        public string OwnerID
        {
            get
            {
                return this.OwnerIDField;
            }
            set
            {
                if (!object.ReferenceEquals(this.OwnerIDField, value))
                {
                    this.OwnerIDField = value;
                    this.RaisePropertyChanged("OwnerID");
                }
            }
        }

        [DataMember]
        public int RowID
        {
            get
            {
                return this.RowIDField;
            }
            set
            {
                if (!this.RowIDField.Equals(value))
                {
                    this.RowIDField = value;
                    this.RaisePropertyChanged("RowID");
                }
            }
        }

        [DataMember]
        public string StatementID
        {
            get
            {
                return this.StatementIDField;
            }
            set
            {
                if (!object.ReferenceEquals(this.StatementIDField, value))
                {
                    this.StatementIDField = value;
                    this.RaisePropertyChanged("StatementID");
                }
            }
        }

        [DataMember]
        public string UpdatedBy
        {
            get
            {
                return this.UpdatedByField;
            }
            set
            {
                if (!object.ReferenceEquals(this.UpdatedByField, value))
                {
                    this.UpdatedByField = value;
                    this.RaisePropertyChanged("UpdatedBy");
                }
            }
        }

        [DataMember]
        public DateTime UpdatedDate
        {
            get
            {
                return this.UpdatedDateField;
            }
            set
            {
                if (!this.UpdatedDateField.Equals(value))
                {
                    this.UpdatedDateField = value;
                    this.RaisePropertyChanged("UpdatedDate");
                }
            }
        }

        [DataMember]
        public string WhID
        {
            get
            {
                return this.WhIDField;
            }
            set
            {
                if (!object.ReferenceEquals(this.WhIDField, value))
                {
                    this.WhIDField = value;
                    this.RaisePropertyChanged("WhID");
                }
            }
        }

        [DataMember]
        public string WhName
        {
            get
            {
                return this.WhNameField;
            }
            set
            {
                if (!object.ReferenceEquals(this.WhNameField, value))
                {
                    this.WhNameField = value;
                    this.RaisePropertyChanged("WhName");
                }
            }
        }
    }
}

